const store = new Vuex.Store({
    state: () => ({
        SelectElement: '',//当前是否选中某元素
        SortableSwitch: false,//是否开启拖拽组件属性
        RowItemMark:[],//栅格标记位，被标记的id保存到这
        RowItemSort:[],//拖拽标记位，拖拽是触发
        fit: [{//图片布局
            label: '全铺',
            value: 'fill',
        }, {
            label: '自适应缩放',
            value: 'contain',
        }, {
            label: '完全填充',
            value: 'cover',
        }, {
            label: '移除样式',
            value: 'none',
        }, {
            label: '屏幕适配',
            value: 'scale-down'
        }],
        unit: [{//单位
            label: 'px',
            value: 'px',
        }, {
            label: '%',
            value: '%',
        }, {
            label: 'vh',
            value: 'vh',
        }],
        predefineColors: ['#409EFF','#67C23A','#E6A23C','#F56C6C','#909399'],//可选颜色颜色
        size:[{//尺寸
            label:'正常',
            value:''
        },{
            label:'中等',
            value:'medium'
        },{
            label:'小',
            value:'small'
        },{
            label:'更小',
            value:'mini'
        }],
    }),
    mutations: {//commit调用
        setSelectElement(state, payload) {
            state.SelectElement = payload
        },
        setSortableSwitch(state) {
            state.SortableSwitch = !state.SortableSwitch
        },
        setRowItemMark(state,payload){
            state.RowItemMark = payload
        },
        setRowItemSort(state,payload){
            state.RowItemSort = payload
        }
    },
});